// 用户模块
const state = {
  // 用户信息
  profile: {
    id: '',
    avatar: '',
    nickname: '',
    account: '',
    mobile: '',
    token: ''
  },
  // 登录成功后跳转地址
  redirectUrl: '/'
}

const mutations = {
// 修改用户信息，payload就是用户信息对象
  setUser (state, payload) {
    state.profile = payload
  },
  setRedirectUrl (state, payload) {
    state.redirectUrl = payload
  }
}

const actions = {

}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
